<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ-题目列表</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: #f0f2f5;
            color: #333;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(90deg, #2c3e50, #3498db);
            padding: 15px 20px;
            border-radius: 8px;
            margin-bottom: 30px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }

        .nav-links {
            display: flex;
        }

        .navbar a {
            color: white;
            text-decoration: none;
            margin-right: 25px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        .navbar a:hover {
            color: #fff;
            text-decoration: underline;
        }

        .login-btn {
            background-color: #e74c3c;
            color: white;
            padding: 8px 15px;
            border-radius: 4px;
            transition: background-color 0.3s;
            margin-left: auto;
        }

        .login-btn:hover {
            background-color: #c0392b;
        }

        .question-container {
            max-width: 1200px;
            margin: 30px auto;
            padding: 0 20px;
        }

        .question-list {
            background-color: white;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            padding: 30px;
            margin-top: 20px;
        }

        .question-list h1 {
            text-align: center;
            color: #2c3e50;
            margin-bottom: 30px;
            font-size: 32px;
            font-weight: 600;
        }

        .question-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        .question-table th {
            background-color: #f8f9fa;
            color: #2c3e50;
            font-weight: 600;
            padding: 15px 20px;
            text-align: left;
            border-bottom: 2px solid #e1e4e8;
        }

        .question-table td {
            padding: 15px 20px;
            border-bottom: 1px solid #e1e4e8;
            transition: background-color 0.3s;
        }

        .question-table tr:hover {
            background-color: #f8f9fa;
        }

        .question-table a {
            color: #3498db;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
        }

        .question-table a:hover {
            color: #2980b9;
            text-decoration: underline;
        }

        .question-table .star {
            color: #f39c12;
            font-weight: 600;
        }

        .footer {
            text-align: center;
            padding: 20px;
            color: #7f8c8d;
            font-size: 14px;
            margin-top: 40px;
            background-color: white;
            border-top: 1px solid #e1e4e8;
            border-radius: 0 0 8px 8px;
        }

        @media (max-width: 768px) {
            .navbar {
                flex-direction: column;
                padding: 15px;
            }

            .nav-links {
                margin-bottom: 15px;
            }

            .navbar a {
                margin-right: 10px;
            }

            .question-table {
                font-size: 14px;
            }

            .question-table th,
            .question-table td {
                padding: 12px 15px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="navbar">
            <div class="nav-links">
                <a href="index.html">首页</a>
                <a href="questions.html">题库</a>
                <a href="#">竞赛</a>
                <a href="#">讨论</a>
                <a href="#">求职</a>
            </div>
            <a href="#" class="login-btn">登录</a>
        </div>

        <div class="question-container">
            <div class="question-list">
                <h1><i class="fas fa-list"></i> OnlineJudge 题目列表</h1>
                <table class="question-table">
                    <thead>
                        <tr>
                            <th>编号</th>
                            <th>标题</th>
                            <th>难度</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{#question_list}}
                        <tr>
                            <td>{{number}}</td>
                            <td><a href="/question/{{number}}">{{title}}</a></td>
                            <td class="star">{{star}}</td>
                        </tr>
                        {{/question_list}}
                    </tbody>
                </table>
            </div>
        </div>

    </div>
</body>
</html>